const BASE_URL = 'https://project.develop.lanchengiot.cn'
export const myRequest = (options)=>{
	return new Promise((resolves,reject)=>{
		uni.request({
			url:BASE_URL+options.url,
			header:{"Authorization" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyOTgyNzg0NjAwNjgyMDg2NDAiLCJraW5kIjoyLCJpc3MiOiIyOTgyNzc4NjM4MzkzNzEyNjQiLCJleHAiOjcwNTM5ODI3NjN9.Dc8KakJcXy0T3mHG0Zt9G4QKQZFBNi6c5-zfOG2fz5U"},
			method:options.method || 'POST',
			data:options.data || {},
			success:(res)=>{
				//console.log(res,'ressss');
				// if(res.data.status !==0){
				// 	return uni.showToast({
				// 		title:'获取数据失败'
				// 	})
				// }
				return resolves(res)
			},
			fail:(err)=>{
				uni.showToast({
					title:'请求接口失败',
					})
					reject(err)
			}
		})
	})
}
